package com.igeek.javase.ch04.gameTest;

/*
 *@author wangpeng
 *2023/7/13 19:32
 *@description TODO
 */

public abstract class Role {
    //属性
    private String nickName;
    private int level;
    private int blood;
    private int power;
    private int defence;
    private String kind;

    //无参构造
    public Role() {
    }
    //有参构造
    public Role(String nickName, int level, int blood, int power, int defence, String kind) {
        this.nickName = nickName;
        this.level = level;
        this.blood = blood;
        this.power = power;
        this.defence = defence;
        this.kind = kind;
    }

    //方法
    public String getNickName() {
        return nickName;
    }

    public void setNickName(String nickName) {
        this.nickName = nickName;
    }

    public int getLevel() {
        return level;
    }

    public void setLevel(int level) {
        this.level = level;
    }

    public int getBlood() {
        return blood;
    }

    public void setBlood(int blood) {
        this.blood = blood;
    }

    public int getPower() {
        return power;
    }

    public void setPower(int power) {
        this.power = power;
    }

    public int getDefence() {
        return defence;
    }

    public void setDefence(int defence) {
        this.defence = defence;
    }

    public String getKind() {
        return kind;
    }

    public void setKind(String kind) {
        this.kind = kind;
    }

    //方法（使用抽象类）
    public abstract boolean isDead();
    public abstract void attack(Role role);


}

